<!-- <div class="app-head" myApp="AppHead">
  <nav class="navbar navbar-default navbar-static-top head_nav" style="height: 1px;">
    <div class="container">
      <li><%= link_to '登出', session_path, method: :delete %></li>
    </div>
  </nav>
</div> -->


<div class="header white-bg">
  <div class="sidebar-toggle-box">
      <i class="fa fa-bars"></i>
  </div>

  <%= link_to sales_store_products_path(@current_store || current_store), class: "logo", target: "_blank", title: "点击进入公司商城首页!" do %>
    Com<span>pany</span>&nbsp;mall
  <% end %>

  <div class="top-nav">
        <ul class="nav pull-right top-menu">
            <li class="dropdown">
                <a data-toggle="dropdown" class="dropdown-toggle js-toggle-profile" href="#">
                  <% cache "header:#{current_store.id}:#{current_store.updated_at}" do %>
                    <!-- <%= image_tag '', class: 'header_preview_img' %> -->
                  <% end %>
                  <span class="username"> <%= current_user.full_name %></span>
                  <!-- <b class="caret"></b> -->
                </a>
                <ul class="dropdown-menu extended logout js-hiding">
                    <div class="log-arrow-up"></div>
                    <!-- <li><a href="#"><i class=" fa fa-suitcase"></i>Profile</a></li> -->
                    <li><a href="#"><i class="fa fa-cog"></i> Settings</a></li>
                    <!-- <li><a href="#"><i class="fa fa-bell-o"></i> Notification</a></li> -->
                    <li><a href="/session" data-method="delete" ><i class="fa fa-sign-out"></i> 登出</a></li>
                </ul>
            </li>
            <!-- <li class="sb-toggle-right">
                <i class="fa  fa-align-right"></i>
            </li> -->
        </ul>
    </div>
</div>


<script type="text/javascript">
  $("a.js-toggle-profile").on("click", function(){
    $("ul.dropdown-menu.extended.logout").toggle();
  })
</script>
